package cn.itcast.scala

trait Animal {
  def speak()

  def listen():Unit = {
  }

  def run():Unit = {
    println("running...")
  }
}

class People extends Animal {
  override def speak():Unit = {
    println("I am speaking...")
  }
}

object People {
  def main(args: Array[String]): Unit = {
    var people = new People
    people.speak()
    people.listen()
    people.run()
  }
}
